1. Field of the Invention
The present invention relates to a video method, and more particularly to a video object segmentation method and system.
2. Description of Related Art
With the public awareness of home safety and the special health and medical care for the old and weak, industries related to the security and safety monitoring services flourish. Most security and safety monitoring services involve monitoring images and segmenting the monitored image into foreground images. Then, the foreground images are tracked or identified to achieve the goal of security monitoring and telecaring. However, the great quantity of image data that needs to be processed for home care and security monitor services are significant and involves privacy concerns, and hence the images are recorded in frames. Therefore, correctly segmenting out meaningful foreground images, so that they can be efficiently processed or recorded, is increasingly important.
The conventional method of segmenting a video object includes obtaining the required background after the image has gone through a statistical calculation cycle and then using the background to make the object be segmented out. However, in a video environment where several groups of cameras are periodically switched to play and monitor, it is impossible to get the required background for the object segmentation in time due to a restriction imposed by the lowest number of effective images that can be sampled. Furthermore, in a real environment, the natural change and flicker of the light source, the change of the shading or the aperture of the camera may lead a shift in the luminance of the entire image or part of the image. Therefore, judgment errors may occur when images are compared or objects are segmented.
FIG. 1 is a flow diagram showing a conventional method of efficiently moving object segmentation using the background registration technique. The technique is disclosed in the article “Efficient Moving Object Segmentation Algorithm Using Background Registration Technique,” IEEE Transactions on Circuit and Systems for Video Technology, Vol. 12, No. 7, July 2002, pp. 577-586. The method includes processing an input image Fn through a gradient filter (in step S101). The gradient filtering includes subtracting the image obtained by performing an erosion of morphological operation on the image Fn from the image obtained by performing a dilation of morphological operation on the image Fn so as to eliminate object segmentation error resulting from shadows and produce gradient filtered image Fn′. Then, a segmentation algorithm (step S103) between the image Fn′ and a previous image Fn−1′ stored in a frame buffer (step S102) is performed to obtain a moving object. Finally, an erosion of morphological operation of the segmented foreground image is performed to eliminate the error pixel caused by the gradient filter (step S104). However, this method provides inferior object segmentation when the edges are not so clearly defined.
FIG. 2 is a flow diagram showing a conventional detection of moving cast shadow method for object segmentation. The method is disclosed in the article “Detection of Moving Cast Shadow for Object Segmentation,” IEEE Transactions on Multimedia, Vol. 1, No. 1, March 1999, pp. 65-67. The method mainly involves detecting and eliminating shadow areas (step S201) and includes three kinds of processing treatments. The first kind of processing treatment is the detection of static background edge (step S202) for extracting the image of static background edge. The second kind of processing treatment is the detection of uniform changes of shading (step S203) for extracting the image of uniform-changing shading areas. The third kind of treatment is the penumbra detection (step S204) for extracting the image of the penumbra area. Finally, the three foregoing types of images are used to detect the changed areas due to the moving cast shadows (step S205) and then object segmentation is performed. Although the method takes into consideration the erroneous judgment in the object segmentation due to moving cast shadows, the algorithm is complicated so that instantaneous object segmentation is impossible. Hence, the method is unsuitable for operating in a real-time environment.
Furthermore, U.S. Pat. No. 6,870,945 proposed a “Video object tracking by estimating and subtracting background” technique. The idea behind the patent is that any changes in the image require an initial cycle, for example, the embodiment mentioned a three consecutive image frame cycle, for renewing the foreground or background mask before the object can be correctly segmented. In addition, when the luminance of the light source changes, flickers or the shading causes problems such as non-uniform luminance or a shift in the luminance of the image, erroneous judgment of the foreground or background may easily occur.
In addition, U.S. Pat. No. 6,973,213 also proposed a “Background-based segmentation” technique. The idea behind the patent is to utilize a low pass filter to extract a background image block and utilize a resolution refinement method to extract an object image block and then perform a classification. However, this method is only suitable for optical character recognition.